import type { EnergyDataReportInformant } from '../types'

export default function useInformant(
) {
  const informant = ref<EnergyDataReportInformant>({
    personInCharge: '',
    informer: '',
    telephone: '',
    fillInDate: '',
    id: undefined,
  })

  function setInformant(v: any) {
    informant.value = {
      id: v.id || undefined,
      personInCharge: v.personInCharge,
      informer: v.informer,
      telephone: v.telephone,
      fillInDate: v.fillInDate,
    }
  }

  return {
    informant,
    setInformant,
  }
}
